﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CreateTournamentMenu.ascx.cs" Inherits="VirtualTournaments.Frontend.MenuControls.TournamentManagerMenu.CreateTournamentMenu" %>

<link href="../../../App_Themes/TournamentManager/TournamentManager.css" rel="stylesheet" type="text/css" />

<asp:Panel ID="ContentPanel" runat="server">
<div id="CreateTournamentDiv" runat="server" class="TournamentManagerOptionsDivCssClass">
    <asp:UpdatePanel ID="CreateTeamUpdatePanel" runat="server">
    <ContentTemplate>

    <asp:Table ID="TitleTable" runat="server" Width="100%">
        <asp:TableHeaderRow>
            <asp:TableHeaderCell HorizontalAlign="Center">
                <asp:Label ID="CreateTournamentTitleLabel" runat="server" Text="New Tournament"></asp:Label>
            </asp:TableHeaderCell>
        </asp:TableHeaderRow>
    </asp:Table>
    <br />
    <asp:Label ID="TournamentNameLabel" runat="server" Text="Tournament Name: "></asp:Label>
    <asp:TextBox ID="TournamentNameTextBox" runat="server"></asp:TextBox><br />    
    <asp:Label ID="TournamentTypeLabel" runat="server" Text="Tournament Type: "></asp:Label>
    <asp:RadioButtonList ID="TournamentTypeRadioButtonList" runat="server" OnSelectedIndexChanged="TournamentTypeRadioButtonList_OnSelectedIndexChanged"
        RepeatDirection="Horizontal" AutoPostBack="true">
        <asp:ListItem Text="All against all"></asp:ListItem>
        <asp:ListItem Text="Play Off"></asp:ListItem>
    </asp:RadioButtonList>
    <br />
    <asp:Label ID="TeamCountLabel" runat="server" Text="Team Count: "></asp:Label>
    <asp:DropDownList ID="TournamentTeamCountDropDownList" runat="server" ></asp:DropDownList>
    <br /><br />
    
    <asp:Table ID="TeamSelectionTable" runat="server" Width="100%">
        <asp:TableHeaderRow>
            <asp:TableHeaderCell>Available Teams</asp:TableHeaderCell>
            <asp:TableHeaderCell>Team Transfer</asp:TableHeaderCell>
            <asp:TableHeaderCell>Selected Teams</asp:TableHeaderCell>
        </asp:TableHeaderRow>
        <asp:TableRow>
            <asp:TableCell Width="40%" HorizontalAlign="Center" VerticalAlign="Middle">
                <asp:ListBox ID="AvailableTeamsListBox" runat="server" Rows="10" Width="60%"></asp:ListBox>
            </asp:TableCell>
            <asp:TableCell Width="20%" HorizontalAlign="Center">
                <asp:Table ID="SelectionButtonsInnerTable" runat="server" Width="100%">
                    <asp:TableRow>
                        <asp:TableCell>
                            <asp:Button ID="AddTeamButton" runat="server" Text="---->" Font-Size="Large" Font-Bold="true" Font-Names="Calibri"
                            OnClick="AddTeamButton_OnClick"/>
                        </asp:TableCell>
                    </asp:TableRow>
                    
                    <asp:TableHeaderRow>
                        <asp:TableHeaderCell>
                            <br />
                        </asp:TableHeaderCell>
                    </asp:TableHeaderRow>
                    
                    <asp:TableRow>
                        <asp:TableCell>
                            <asp:Button ID="RemoveTeamButton" runat="server" Text="<----" Font-Size="Large" Font-Bold="true" Font-Names="Calibri"
                            OnClick="RemoveTeamButton_OnClick"/>
                        </asp:TableCell>
                    </asp:TableRow>
                </asp:Table>
            </asp:TableCell>
            <asp:TableCell Width="40%" HorizontalAlign="Center" VerticalAlign="Middle">
                <asp:ListBox ID="SelectedTeamsListBox" runat="server" Rows="10" Width="60%"></asp:ListBox>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    <br />
    <asp:Table ID="ConfirmationButtonsTable" runat="server" Width="100%">
        <asp:TableRow>
             <asp:TableCell Width="25%"></asp:TableCell>
             <asp:TableCell Width="25%" HorizontalAlign="Center">
                <asp:Button ID="CreateTournamentCancelButton" runat="server" Text="Cancel" Font-Size="Large" Font-Bold="true" 
                Font-Names="Calibri" OnClick="CreateTournamentCancelButton_OnClick" />
            </asp:TableCell>
            
            <asp:TableCell Width="50%" HorizontalAlign="Left">
                <asp:Button ID="CreateTournamentConfirmButton" runat="server" Text="Create Tournament" Enabled="false" Font-Size="Large" Font-Bold="true" 
                Font-Names="Calibri" OnClick="CreateTournamentConfirmButton_OnClick" />
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    
    </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <div id="ButtonBackDiv" class="ButtonBackDivCssClass">
        <asp:Button ID="GoBackButton" runat="server" OnClick="GoBackButton_OnClick" Text="< Go Back >" 
            CssClass="CreateTournamentButtonCssClass" BackColor="Transparent" BorderStyle="None"/>
    </div>
    
</div>
</asp:Panel>